<?php

class Application_Form_GestionGroupe_ChangeCodeForm extends Zend_Form
{
	public function init()
	{
		$this->setName('changecode');

		$id = new Zend_Form_Element_Hidden('id');

		$code = new Zend_Form_Element_Text('code');
		$code->setLabel('Nouveau code : ')
		->setRequired('true')
		->addFilter('StripTags')
		->addFilter('StringTrim')
		->addValidator('NotEmpty')
		->setAttrib("autocomplete", "off")
		->setDecorators(array('ViewHelper','FormErrors','Errors'));

		$send = new Zend_Form_Element_Submit('send');
		$send->setAttrib('id','send_button')
		->setLabel('Enregistrer')
		->setAttrib('class','button')
		->setDecorators(array('ViewHelper','FormErrors','Errors'));

		$cancel = new Zend_Form_Element_Reset('cancel');
		$cancel->setAttrib('id','send_button')
		->setLabel('Annuler')
		->setAttrib('class','button')
		->setDecorators(array('ViewHelper','FormErrors','Errors'));

		$this->addElements(array($id,$code,$send,$cancel));
	}
}